package com.jida.tijian.service;

import com.jida.tijian.domain.Users;
import com.jida.tijian.dto.ResponseObject;

public interface UsersService {
    /* @Override
        public ResponseObject<Users> login(Users user){
            ResponseObject<Users> responseObject=null;
            //1.先查
            Users result=usersMapper.selectByPrimaryKey(user.getUserId());


            //2.看有没有
            if(result==null){
                //告诉前端
                responseObject=new ResponseObject<>(201,"手机号尚未注册");
                //return
                return responseObject;
            }

            //3.比对密码
            if(!result.getPassword().equals(user.getPassword())){
                //告诉前端
                responseObject=new ResponseObject<>(202,"密码错误");
                //return
                return responseObject;
            }

            responseObject=new ResponseObject<>(ResponseObject.SUCCESS_STATUS,ResponseObject.SUCCESS_DESC,result);

            return responseObject;
        }*/

    ResponseObject<Users> login(Users user);
}
